//获取当前用户菜单
import http from "@/utils/http"
export const currentUserMenusApi = (userId) => {
    return http.get(`/auth/menu/menus/user/${userId}`)

}
//
export const currentRoleMenusApi = (roleId) => {
    return http.get(`/auth/menu/menus/role/${roleId}`)

}
//获取树形菜单
export const treeMenusApi = (userId) => {
    return http.get('/auth/menu/tree')

}
//
//获取所有菜单
export const menusApi = () => {
    return http.get("/auth/menu/menus");
}

//新增
export const addMenuApi = (data) => {
    return http.post("/auth/menu/add", data);
}
//编辑
export const editMenuApi = (data) => {
    return http.post("/auth/menu/edit", data);
}

//按角色id检索角色
export const menuInfoByIdApi = (menuId) => {
    return http.get(`/auth/menu/info/${menuId}`);
}
// 删除角色
export const delMenuApi = (menuId) => {
    return http.get(`/auth/menu/del/${menuId}`);
}
//获取一级菜单
export const oneMenuApi = (menuId) => {
    return http.get('/auth/menu/menus/one');
}

